From 5318e9850cac5cab6d160b910aa889693cd46065 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 5 Jul 2004 07:05:48 +0000 Subject: [PATCH] INSERT IGNORE for dumpUpdate() as well --- includes/LinksUpdate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 5d293907ca..da4f47cf5c 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -195,7 +195,7 @@ class LinksUpdate { $a = $wgLinkCache->getGoodLinks(); $sql = ""; if ( 0 != count( $a ) ) { - $sql = "INSERT INTO links (l_from,l_to) VALUES "; + $sql = "INSERT IGNORE INTO links (l_from,l_to) VALUES "; $first = true; foreach( $a as $lt => $lid ) { if ( ! $first ) { $sql .= ","; } @@ -212,7 +212,7 @@ class LinksUpdate { $a = $wgLinkCache->getBadLinks(); $sql = ""; if ( 0 != count ( $a ) ) { - $sql = "INSERT INTO brokenlinks (bl_from,bl_to) VALUES "; + $sql = "INSERT IGNORE INTO brokenlinks (bl_from,bl_to) VALUES "; $first = true; foreach( $a as $blt ) { $blt = wfStrencode( $blt ); @@ -230,7 +230,7 @@ class LinksUpdate { $a = $wgLinkCache->getImageLinks(); $sql = ""; if ( 0 != count ( $a ) ) { - $sql = "INSERT INTO imagelinks (il_from,il_to) VALUES "; + $sql = "INSERT IGNORE INTO imagelinks (il_from,il_to) VALUES "; $first = true; foreach( $a as $iname => $val ) { $iname = wfStrencode( $iname ); @@ -252,7 +252,7 @@ class LinksUpdate { # Do the insertion $sql = ""; if ( 0 != count ( $add ) ) { - $sql = "INSERT INTO categorylinks (cl_from,cl_to,cl_sortkey) VALUES "; + $sql = "INSERT IGNORE INTO categorylinks (cl_from,cl_to,cl_sortkey) VALUES "; $first = true; foreach( $add as $cname => $sortkey ) { # FIXME: Change all this to avoid unnecessary duplication -- 2.20.1